#include "post.h"
#include "postreply.h"

Post::Post(const QString &content, const QDateTime &time)
    : m_content(content),
    m_time(time),
    m_likeCount(0)
{
}

QString Post::content() const
{
    return m_content;
}

QDateTime Post::time() const
{
    return m_time;
}

int Post::likeCount() const
{
    return m_likeCount;
}

QList<PostReply *> Post::replies() const
{
    return m_replies;
}

void Post::addReply(PostReply *reply)
{
    m_replies.append(reply);
}

void Post::addLike()
{
    m_likeCount++;
}
